import React from 'react'
import axios from '../../utils/index'
import { Image, Flex, Cell } from 'react-vant';
import { ChatO, ManagerO, LocationO, BullhornO, CreditPay, ShieldO, LabelO, QuestionO, FriendsO,Close } from '@react-vant/icons';
import './My.css'
import { useNavigate } from 'react-router-dom';

export default function My() {
  const navigate = useNavigate();
  return (
    <div>
      <div className='my_header'>
        <div className='my_con'>
          <img src="/hao.jpg" alt="" />
          <h2>个人中心</h2>
          <div className='chat'>
            <ChatO fontSize={25} />
            {/* <ChatO  /> */}
          </div>
        </div>
      </div>
      <div className='my_touxiang'>
        <div className='demo-image'>
          <Image round fit={'cover'} width='100px' height='100px' src={'https://img.yzcdn.cn/vant/cat.jpeg'} />{' '}
        </div>
        <h2>杨廷和</h2>
        <h3>1512030162</h3>
      </div>
      <hr />
      <div className='my_content'>
        <Cell title='编辑个人资料' isLink icon={<ManagerO />}></Cell>
        <Cell title='地址设置' isLink icon={<LocationO  />} onClick={()=>{navigate('/address')}}></Cell>
        <Cell title='通知设置' isLink icon={<BullhornO  />}></Cell>
        <Cell title='支付设置' isLink icon={<CreditPay  />}></Cell>
        <Cell title='安全设置' isLink icon={<ShieldO  />}></Cell>
        <Cell title='隐私政策' isLink icon={<LabelO  />} onClick={()=>{navigate('/privacy')}}></Cell>
        <Cell title='帮助中心' isLink icon={<QuestionO  />}></Cell>
        <Cell title='邀请好友' isLink icon={<FriendsO  />}></Cell>
        <Cell title='退出登录' icon={<Close  />}></Cell>
      </div>
    </div>
  )
}
